package adv5;

import java.io.*;
import java.util.Date;

public class FileInfo {

	public static void main(String[] args) {
		// File f = new File("E:\\资料", "css-设计-作业");// 上下级
		File f2 = new File("E:\\资料\\java-all");// 单个目录
		System.out.println("是否存在：" + f2.exists());
		System.out.println("是否是文件夹：" + f2.isDirectory());
		long time = f2.lastModified();
		Date d = new Date(time);
		System.out.println("最后修改时间：" + d);
		long size = f2.length();//
		System.out.println("大小：" + size);
		System.out.println(f2.getName());
		System.out.println(f2.getAbsolutePath());//
		// 权限：
		System.out.println("execute:" + f2.canExecute());
		System.out.println("read:" + f2.canRead());
		System.out.println("write:" + f2.canWrite());
	}

}
